FROM nginx:1.20.1

# 拷贝 ssl 文件
RUN mkdir -p /etc/pki/nginx
COPY ./template.yamuu.cn.key /etc/pki/nginx/
COPY ./template.yamuu.cn.pem /etc/pki/nginx/

# 覆盖原配置
COPY ./ssl.conf /etc/nginx/conf.d
RUN rm /etc/nginx/nginx.conf
COPY ./nginx.conf /etc/nginx/

# 拷贝项目 nginx 文件
COPY ./docs/docs.conf /etc/nginx/conf.d/
COPY ./vue3/vue3.conf /etc/nginx/conf.d/
COPY ./vue2/vue2.conf /etc/nginx/conf.d/

# 拷贝并解压 dist.tar
# RUN mkdir /usr/share/nginx/docs/ 
ADD ./docs/dist.tar /usr/share/nginx/docs/
ADD ./vue2/vue2.tar /usr/share/nginx/vue2/
ADD ./vue3/vue3.tar /usr/share/nginx/vue3/

ADD  ./images /usr/share/nginx/images/
